package com.damocode.starter.yx.domain;

public enum HostType {

    USER("https://api.netease.im/nimserver/user/%s"), MSG("https://api.netease.im/nimserver/msg/%s");
    private String type;

    HostType(String type) {
        this.type = type;
    }

    public static HostType getType(String state) {
        for (HostType deviceType : HostType.values()) {
            if (deviceType.type.equalsIgnoreCase(state)) {
                return deviceType;
            }
        }
        throw new RuntimeException(state + " is not a valid Host Type!");
    }

    public String getStrType() {
        return type;
    }

}
